<template>
  <div class="df aic up jcse" >
    <span>上传文件:</span>
    <input type="file" style="border: 1px solid black" ref="inputFile"  @change="changeFile"/>
    <el-link type="primary"  :underline="false" @click="downloadTem">点击此处下载模板</el-link>
  </div>
</template>

<script setup lang="ts">
import { ref,} from 'vue'
import { saveAs } from 'file-saver'

const emit = defineEmits(['file-change'])
const inputFile=ref()
const changeFile=()=>{
  emit('file-change', inputFile.value.files)
}
const downloadTem=()=>{
  saveAs('http://cyrimageoss.oss-cn-chengdu.aliyuncs.com/%E5%B9%B3%E5%8F%B0%E7%85%A7%E7%89%87%E7%B3%BB%E7%BB%9F%E7%85%A7%E7%89%87/ybcnm%E7%99%BD%E5%90%8D%E5%8D%95%E6%8F%90%E7%8E%B0%E6%A8%A1%E6%9D%BF.xlsx?Expires=2050888615&OSSAccessKeyId=LTAI5t7N22kEA61Ug9pLmEMw&Signature=q0wGg7snAImNMHf%2Bnb1xCwPb%2Bbk%3D',)
}
</script>

<style scoped lang="scss">
.up{
  .upload-demo{
    flex: 1;
  }
}

</style>